package com.demo.service.impl;

import com.demo.dao.UserMapper;
import com.demo.pojo.User;
import com.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName UserServicImpl
 * @Description TODO
 * @Author Windy
 * @Date 2022/9/9 19:59
 * @Version 1.0
 **/
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> findAll() {
        return userMapper.findAll();
    }

    @Override
    public boolean updateUser(User user) {
        return userMapper.updateUser(user)>=0;
    }

    @Override
    public boolean insertUser(User user) {
        return userMapper.insertUser(user) >=0;
    }
}
